{extend name='admin@main'}

{block name="content"}

<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">

    <div class="layui-card-body think-box-shadow padding-left-40">

        <div class="layui-form-item layui-row layui-col-space15">
            <label class="layui-col-xs3 relative">
                <span class="color-green">客服名称</span>
                <input name="title_zh_cn"  class="layui-input" placeholder="请输入客服名称" value="{$vo.title_zh_cn|default=''}">
            </label>
        </div>
        <div class="layui-form-item layui-row layui-col-space15">
            <label class="layui-col-xs3 relative">
                <span class="color-green">客服类型</span>
                <select class="layui-select" name="type" required>
                    {foreach ['1'=>'第三方客服','2'=>'Telegram','3'=>'WhatsApp'] as $k=>$v}
                    <!--{eq name='$vo.type' value='$k.""'}-->
                    <option selected value="{$k}">{$v}</option>
                    <!--{else}-->
                    <option value="{$k}">{$v}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </label>
            <label class="layui-col-xs3 relative">
                <span class="color-green">是否显示</span>
                <select class="layui-select" name="show">
                    {foreach ['1'=>'显示','0'=>'隐藏'] as $k=>$v}
                    <!--{eq name='$vo.show' value='$k.""'}-->
                    <option selected value="{$k}">{$v}</option>
                    <!--{else}-->
                    <option value="{$k}">{$v}</option>
                    <!--{/eq}-->
                    {/foreach}
                </select>
            </label>
            <label class="layui-col-xs3 ">
                <span class="color-green">客服链接</span>
                <input name="url" required class="layui-input" placeholder="请输入客服链接" value="{$vo.url|default=''}">
            </label>
        </div>
        <div class="layui-form-item layui-row layui-col-space15">
            <span class="color-green label-required-prev">LOGO</span>
            <table class="layui-table">
                <thead>
                <tr>
                    <td width="" height="80px" class="text-center">
                        <input name="logo" type="hidden" value="{$vo.logo|default=''}">
                    </td>
                </tr>
                </thead>
            </table>
            <script>$('[name="logo"]').uploadOneImage()</script>
        </div>
        <div class="layui-form-item text-center">
            {notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
            <button class="layui-btn layui-btn-danger" ng-click="hsitoryBack()" type="button">取消编辑</button>
            <button class="layui-btn" type="submit">保存客服</button>
        </div>

    </div>
</form>
{/block}

{block name='script'}
<script>
    window.form.render();
</script>
{/block}
